import service from '/@/utils/request';

export const navApi = {
    listNav: (query?: NavQueryDto) => {
        return service.get<PageResult<NavVo>, NavQueryDto>('/admin/nav', {
            params: query
        });
    },
    getNav(navId: number) {
        return service.get<NavVo>(`/admin/nav/${navId}`);
    },
    addNav(navAddDto: NavAddDto) {
        return service.post<NavVo>(`/admin/nav`, navAddDto);
    },
    editNav(navUpdateDto: NavUpdateDto) {
        return service.put<NavVo>(`/admin/nav`, navUpdateDto);
    },
    deleteNav(navId: number) {
        return service.delete<boolean>(`/admin/nav/${navId}`);
    },

}